 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ace="http://www.icefaces.org/icefaces/components" 
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:c="http://java.sun.com/jstl/core">
      

	   <ice:tree value="#{leftNavBean.model}"
	                  var="node"
	                  hideRootNode="false"
	                  hideNavigation="false" rendered="#{loginBean.loginStatus == 'userHome' and loginBean.userBean.userType != 'ADMIN'}">
	      <ice:treeNode>
              <f:facet name="icon">
                  <h:graphicImage value="#{node.userObject.icon}" alt="#{node.userObject.tooltip}"/>
              </f:facet>
              <f:facet name="content">	           
		           <ice:outputText rendered="#{!node.userObject.leaf}" value="#{node.userObject.text}" />
		           <ice:commandLink rendered="#{node.userObject.leaf and node.userObject.text != 'Reports'}" value="#{node.userObject.text}" action="#{factBean.getSegmentForm}">
		            <f:param name="segmentId" value="#{node.userObject.segmentId}" />
		            <f:param name="segmentName" value="#{node.userObject.segmentName}" />
		            <f:param name="makeId" value="#{node.userObject.makeId}" />
		            <f:param name="makeName" value="#{node.userObject.makeName}" />
		            <f:param name="marketId" value="#{node.userObject.marketId}" />
		            <f:param name="marketName" value="#{node.userObject.marketName}" />		                
		           </ice:commandLink>
		           
		           <ice:commandLink rendered="#{node.userObject.leaf and node.userObject.text == 'Reports'}" value="#{node.userObject.text}" action="#{factBean.reportHome}" >
		            		               
		           </ice:commandLink>
	          </f:facet>
	     </ice:treeNode>
	   </ice:tree>
            
            
            <ace:panel id="panel"
                       header="Date"
                       closable="true"
                       toggleable="true"
                       collapsed="false"  styleClass="datePanel" rendered="#{loginBean.loginStatus == 'userHome' and loginBean.userBean.userType != 'ADMIN'}">
               
                
			   		<h:panelGrid id="datePanel" columns="2">
                
            			<h:outputText value="Month"/>
               
					 <ice:selectOneMenu styleClass="monthYearSelectBox" partialSubmit="false" value="#{factBean.month}" >
	   						<f:selectItems value="#{selectBoxBean.monthList}" />
	 				</ice:selectOneMenu>
	 				
                    <h:outputText value="Year"/>
                    <ice:selectOneMenu styleClass="monthYearSelectBox"  partialSubmit="false" value="#{factBean.year}" >
	   						<f:selectItems value="#{selectBoxBean.yearList}" />
	 				</ice:selectOneMenu>
                
					
					</h:panelGrid>  
					
                        
            </ace:panel>
            
            
            
          <ice:tree value="#{leftNavBean.model}"
	                  var="node"
	                  hideRootNode="false"
	                  hideNavigation="false" rendered="#{loginBean.loginStatus == 'userHome' and loginBean.userBean.userType == 'ADMIN'}">
	      <ice:treeNode>
              <f:facet name="icon">
                  <h:graphicImage value="#{node.userObject.icon}" alt="#{node.userObject.tooltip}"/>
              </f:facet>
              <f:facet name="content">	           
		           <ice:outputText rendered="#{!node.userObject.leaf}" value="#{node.userObject.text}" />
		           <ice:commandLink rendered="#{node.userObject.leaf}" value="#{node.userObject.text}" action="#{node.userObject.action}">
		              
		           </ice:commandLink>
	          </f:facet>
	     </ice:treeNode>
	   </ice:tree>
	   
	   <ace:panel id="panel1" styleClass="datePanel" rendered="false">
             Admin Panel
            </ace:panel>
            
</html>
